package com.example.other;

import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelReader;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.read.metadata.ReadSheet;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.example.other.dto.*;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;

/**
 * @description：TODO
 * @author：yufan.wang
 * @create：2023/7/24 14:28
 */
@SpringBootTest
@Slf4j
public class Excel {



    @Test
    public void apply(){
        String fileName = "C:\\Users\\yufan.wang\\Desktop\\乌鲁木齐银行技术标准(1).xlsx";
        String wftfileName = "C:\\Users\\yufan.wang\\Desktop\\all.xlsx";

        String writeFile = "C:\\Users\\yufan.wang\\Desktop\\不同.xlsx";


        List<ReadSheet> wftSheets = EasyExcel.read(wftfileName).build().excelExecutor().sheetList();

        List<ExcelDto> whlist = EasyExcel.read(fileName).head(ExcelDto.class).sheet().doReadSync();


        ExcelReader excelReader = EasyExcel.read(wftfileName).build();

        ExcelWriter excelWriter = EasyExcel.write(writeFile,WriteFileDto.class).build();

        if (!wftSheets.isEmpty()) {
            wftSheets.forEach(sheet->{

                ReadSheet finalSheet = sheet;

                //IndexOrNameDataListener<WftDto> readListener = new IndexOrNameDataListener();
                //excelReader.read(EasyExcel.readSheet(sheet.getSheetNo()).head(WftDto.class).registerReadListener(readListener).build());
                //
                List<WftDto> wftlist = EasyExcel.read(wftfileName).head(WftDto.class).sheet(finalSheet.getSheetNo()).doReadSync();


                List<WriteFileDto> extracted = extracted111(whlist,wftlist);

                WriteSheet writeSheet = EasyExcel.writerSheet( finalSheet.getSheetNo(),finalSheet.getSheetName()).head(WriteFileDto.class).build();
                excelWriter.write(extracted, writeSheet);

            });
        }
        excelReader.finish();
        excelWriter.finish();



    }
    @Test
    public void selectTable(){
        String selectTextPath = "C:\\Users\\yufan.wang\\Desktop\\new.xlsx";
        String allDataPath = "C:\\Users\\yufan.wang\\Desktop\\allTable.xlsx";
        String writePath = "C:\\Users\\yufan.wang\\Desktop\\111.xlsx";
        List<ReadSheet> sheets = EasyExcel.read(allDataPath).build().excelExecutor().sheetList();
        HashSet<Two> hashSet = new HashSet<>();
        for (int i = 0; i < sheets.size(); i++) {
            List<NewDto> doneReadSync = EasyExcel.read(allDataPath).head(NewDto.class).sheet(sheets.get(i).getSheetNo()).doReadSync();
            List<One> ones = EasyExcel.read(selectTextPath).head(One.class).sheet().doReadSync();
            ones.forEach(text->{
                doneReadSync.forEach(data->{
                    if (data.getY8()!=null && data.getY8().contains(text.getN1())) {
                        System.err.println("表："+data.getY1());
                        Two two = new Two();
                        two.setN1(data.getY1());
                        two.setN2(text.getN1());
                        hashSet.add(two);
                    }
                });
            });


        }
        System.err.println("大小："+hashSet.size());
        EasyExcel.write(writePath,Two.class).sheet().doWrite(hashSet);


    }






    /*合并sheet*/
    @Test
    public void all(){
        String allSheetPath = "C:\\Users\\yufan.wang\\Downloads\\04 (1).xlsx";
        String allDataPath = "C:\\Users\\yufan.wang\\Desktop\\allTable.xlsx";
        List<ReadSheet> sheets = EasyExcel.read(allSheetPath).build().excelExecutor().sheetList();
        List<NewDto> wftlist = new ArrayList<>();
        for (int i = 0; i < sheets.size(); i++) {
            List<WftDto> doneReadSync = EasyExcel.read(allSheetPath).head(WftDto.class).sheet(sheets.get(i).getSheetNo()).doReadSync();
            int finalI = i;
            doneReadSync.forEach(data->{
                NewDto newDto = new NewDto();
                //newDto.setY1(Excel.filterChinese(Excel.name.get(finalI)));
                newDto.setY1(Excel.name.get(finalI));
                newDto.setY3(data.getEnName());
                //填写表中字段物理名称对应的中文注释，不能含有括号、空格、逗号等特殊字符，不能含有“的”字
                newDto.setY4(StrUtil.isNotBlank(data.getRemark())?data.getRemark().split("\\.")[0].replace("的",""):null);
                newDto.setY5(data.getDataType());
                newDto.setY6(data.getKey());
                newDto.setY7(data.getYesNull());
                newDto.setY8(data.getRemark());
                wftlist.add(newDto);

            });
        }

        System.err.println("表："+sheets.size());
        System.err.println("字段："+wftlist.size());
        EasyExcel.write(allDataPath,NewDto.class).sheet().doWrite(wftlist);


    }

    @Test
    public void indexOrNameRead() {
        String fileName = "C:\\Users\\yufan.wang\\Desktop\\乌鲁木齐银行技术标准.xlsx";
        String wftfileName = "C:\\Users\\yufan.wang\\Desktop\\all.xlsx";

        String writeFile = "C:\\Users\\yufan.wang\\Desktop\\不同.xlsx";

        List<ReadSheet> wftSheets = EasyExcel.read(wftfileName).build().excelExecutor().sheetList();

        List<ExcelDto> whlist = EasyExcel.read(fileName).head(ExcelDto.class).sheet().doReadSync();


        ExcelReader excelReader = EasyExcel.read(wftfileName).build();

        ExcelWriter excelWriter = EasyExcel.write(writeFile,WriteFileDto.class).build();

        if (!wftSheets.isEmpty()) {
            wftSheets.forEach(sheet->{

                ReadSheet finalSheet = sheet;

                //IndexOrNameDataListener<WftDto> readListener = new IndexOrNameDataListener();
                //excelReader.read(EasyExcel.readSheet(sheet.getSheetNo()).head(WftDto.class).registerReadListener(readListener).build());
                //
                List<WftDto> wftlist = EasyExcel.read(wftfileName).head(WftDto.class).sheet(finalSheet.getSheetNo()).doReadSync();


                List<WriteFileDto> extracted = extracted(whlist,wftlist);

                WriteSheet writeSheet = EasyExcel.writerSheet( finalSheet.getSheetNo(),finalSheet.getSheetName()).head(WriteFileDto.class).build();
                excelWriter.write(extracted, writeSheet);

            });
        }
        excelReader.finish();
        excelWriter.finish();
    }

    /*
    * 1,中文名是否包含  包含：判断英文名是否相同， 不包含:添加
    * 1,英文名是否包含  包含：判断英文名是否相同， 不包含:添加
    * */

    private static List<WriteFileDto> extracted(List<ExcelDto> whlist, List<WftDto> wftList) {
        AtomicInteger atomicInteger = new AtomicInteger(0);
        List<WriteFileDto> writeFileDtos = new ArrayList<>();
        whlist.forEach(whData -> {
            wftList.forEach(wft -> {
                List<String> collect = writeFileDtos.stream().map(WriteFileDto::getWftFiled).collect(Collectors.toList());
                //去除威富通重复字段
                if (collect.contains(wft.getEnName()))return;
                if (StrUtil.isNotBlank(wft.getZnName())) {
                    String wftZnName = wft.getZnName().replace(" ", "").replace(".", "");
                    if (wftZnName.contains(whData.getZhName()) || whData.getZhName().contains(wftZnName)) {
                        if (whData.getEnName().equals(wft.getEnName()) ) {
                            atomicInteger.getAndAdd(1);
                        } else {
                            System.err.println("写入字段1====="+whData.getEnName());
                            WriteFileDto dto = new WriteFileDto();
                            dto.setWhFiled(whData.getEnName());
                            dto.setWftFiled(wft.getEnName());
                            dto.setTableName(wft.getTableName());
                            dto.setZhName(whData.getZhName());
                            dto.setWftZhName(wft.getZnName());
                            dto.setLength(whData.getLength());
                            dto.setJindu(whData.getJindu());
                            writeFileDtos.add(dto);
                        }
                    }
                }
                if (StrUtil.isNotBlank(wft.getEnName())){
                    //String wftZnName = wft.getZnName().replace(" ", "").replace(".", "");
                    if (wft.getEnName().contains(whData.getEnName())){
                        if (StrUtil.isNotBlank(wft.getZnName()) && wft.getZnName().equals(whData.getZhName())) {
                            atomicInteger.getAndAdd(1);
                        } else {
                            System.err.println("写入字段2====="+whData.getEnName());
                            WriteFileDto dto = new WriteFileDto();
                            dto.setWhFiled(whData.getEnName());
                            dto.setWftFiled(wft.getEnName());
                            dto.setTableName(wft.getTableName());
                            dto.setZhName(whData.getZhName());
                            dto.setWftZhName(wft.getZnName());
                            dto.setLength(whData.getLength());
                            dto.setJindu(whData.getJindu());
                            writeFileDtos.add(dto);
                        }
                    }
                }
            });
        });
        System.err.println("========================");
        System.err.println("英文名称相同数 "+atomicInteger.get());
        System.err.println("写入条数 "+writeFileDtos.size());
        return writeFileDtos;
    }


    private static List<WriteFileDto> extracted111(List<ExcelDto> whlist, List<WftDto> wftList) {
        List<WriteFileDto> writeFileDtos = new ArrayList<>();
        Map<String, WftDto> wftDtoMap = wftList.stream().collect(Collectors.toMap(WftDto::getEnName, each -> each,(value1, value2) -> value1));
        whlist.forEach(whData -> {
            if (StrUtil.isBlank(whData.getWftFiled()))return;
            HashSet<String> hashSet = new HashSet<>(Arrays.asList(whData.getWftFiled().split(",")));
            List<String> list = new ArrayList<>(hashSet);
            list.forEach(whFiled->{

                if (wftDtoMap.containsKey(whFiled)){
                    WftDto wftDto = wftDtoMap.get(whFiled);
                    System.err.println("写入字段: 乌行=="+whData.getEnName()+" 威富通==="+wftDto.getEnName());

                    WriteFileDto dto = new WriteFileDto();
                    dto.setWhFiled(whData.getEnName());
                    dto.setZhName(whData.getZhName());

                    dto.setLength(wftDto.getLength());
                    dto.setJindu(wftDto.getJindu());
                    dto.setWftFiled(wftDto.getEnName());
                    dto.setTableName(wftDto.getTableName());
                    dto.setWftZhName(wftDto.getZnName());

                    writeFileDtos.add(dto);
                }else {
                    System.err.println("不包含key==="+whFiled);
                }

            });
        });
        System.err.println("写入条数 "+writeFileDtos.size());
        return writeFileDtos;
    }

    /**
     * 过滤汉字
     * @param chin
     * @return
     */
    public static String filterChinese(String chin){
        return chin.replaceAll("[\\u4e00-\\u9fa5]", "");
    }


    final static List<String> name = Arrays.asList(
            "ACC_ACCOUNTING_DATA核算数据",
            "ACC_ACCOUNTING_RELATION核算结果数据关联",
            "ACC_ACCOUNTING_RESULT核算数据结果",
            "ACC_BILL_HEAD对账单头",
            "ACC_CASHIER_BILL_SPAYSPAY收银员统计",
            "ACC_CHANNEL_BILL_MERCHANT",
            "ACC_CHECK_BILL_CHANNEL渠道日结",
            "ACC_CHECK_BILL_EXCEPTION对账异常记录",
            "ACC_CHECK_BILL_EXP对账单下载任务",
            "ACC_CHECK_BILL_MERCHANT商户日结",
            "ACC_CHECK_BILL_MERCHANT_MONTH商户月结",
            "ACC_CHECK_BILL_MERCHANT_WEEK商户日结周统计",
            "ACC_CHECK_BILL_RESULT对账结果统计",
            "ACC_CHECK_BILL_TASK对账任务",
            "ACC_CHECK_BUSINESS_EXCEPTION业务对账异常",
            "ACC_CHECK_BUSINESS_MERCHANT业务对账日结",
            "ACC_CHECK_BUSINESS_RESULT业务对账结果统计",
            "ACC_CHECK_BUSINESS_TASK业务任务",
            "ACC_D0_CHECK_BILL_MERCHANTD0商户日结",
            "ACC_D0_PAY_ORDER订单",
            "ACC_DAY_BILL_POSPOS日结",
            "ACC_FREEZE_CHECK_BILL_MERCHANT商户日结冻结",
            "ACC_MCH_NOTRADE_STAT无交易商户统计",
            "ACC_MERCHANT_BILL_HEAD商户对账单头",
            "ACC_MERCHANT_BILL_LOG商户对账单生成流水",
            "ACC_MERCHANT_BILL_TASK商户下载对账单任务",
            "ACC_MONTH_CHECK_BILL_MERCHANT",
            "ACC_ORDER_FREEZERacc延迟订单",
            "ACC_POS_DIRECT_TX直连POS交易流水",
            "ACC_POS_TX银联POS文件手续费统计",
            "ACC_RED_FIRE_PAY_ORDER红火计划订单",
            "ACC_UNION_AERR_RECORD银联差错记录",
            "ACC_UNION_ALI_ERR银联支付宝差错记录",
            "ACC_UN_POS_FEE_STAT通道费用",
            "ALARM_FAST_MSG",
            "ALARM_INFO",
            "ALARM_MSG",
            "ALARM_SERVER",
            "ALARM_SETTING",
            "ALARM_TEL",
            "CLE_ACC_PLAN_CONF渠道日结方案配置",
            "CLE_ACC_PLAN_CONF_LOG渠道日结配置日志",
            "CLE_APP_LOG清分模块日志",
            "CLE_BILL_COMPARE_STAT浦发对账结果汇总",
            "CLE_BILL_MERGE_CONF清分记录合并配置",
            "CLE_BILL_SPLIT_MAP清分记录拆分映射",
            "CLE_BILL_SUBSIDY_STAT管会系统报",
            "CLE_BOUNTY_CONF奖励金配置",
            "CLE_BOUNTY_DETAIL奖励金明细",
            "CLE_CASH_ACCOUNT_LOG提现清分操作记录",
            "CLE_CASH_ACCOUNT_TX提现明细",
            "CLE_CASH_CHECK_RESULT",
            "CLE_CHANNEL_ACC_BILL渠道日结",
            "CLE_CHANNEL_ACC_BILL_STAT渠道日结汇总",
            "CLE_CHANNEL_ACC_TASK渠道日结任务",
            "CLE_CHANNEL_FEE_DETAIL分润渠道",
            "CLE_CHANNEL_FEE_DETAIL_TASK分润渠道定时任务",
            "CLE_CHANNEL_SUBSIDY_BILL渠道补贴",
            "CLE_CH_ACC_ERROE_DETAIL渠道日结异常数据明细",
            "CLE_CLEANING_ACCOUNTING清分核算单记录",
            "CLE_CLEANING_ADJUST清分调账",
            "CLE_CLEANING_BANK_INFO清分银行账户信息",
            "CLE_CLEANING_BILL清分",
            "CLE_CLEANING_BILL_DETAIL清分明细",
            "CLE_CLEANING_BILL_FREEZE清分记录冻结",
            "CLE_CLEANING_BILL_GSAE",
            "CLE_CLEANING_BILL_HISTORY清分历史",
            "CLE_CLEANING_BILL_SENSITIVE清分敏感操作记录",
            "CLE_CLEANING_CHFEE_MODIFY_LOG渠道金额修改日志",
            "CLE_CLEANING_ERROR_PROCESS清分差错",
            "CLE_CLEANING_EXCESS_REFUND清分超退",
            "CLE_CLEANING_FILE_STAT清分文件数据",
            "CLE_CLEANING_INVOICE清分发票信息",
            "CLE_CLEANING_LOG_SENSITIVE清分敏感操作记录日志",
            "CLE_CLEANING_MERGE_TASK清分明细合并任务",
            "CLE_CLEANING_PROCESS_CONF清分处理配置",
            "CLE_CLEANING_PROCESS_LOG清分操作记录",
            "CLE_CLEANING_REFUND清分超退扣款",
            "CLE_CLEANING_RETURN_LOG清分回导日志",
            "CLE_CLEANING_STAT清分统计",
            "CLE_CLEANING_SUBSIDY_STAT手续费收支统计",
            "CLE_CLEANING_TRANSFER_INFO清分文件传输信息",
            "CLE_CLEANING_WHITE浦发T1清分白名单",
            "CLE_CLOUD_INVOICE_FILE浙商发票文件",
            "CLE_D0_ADVANCE_SIDED0垫资方信息",
            "CLE_D0_CASH_CONFD0提现接口配置",
            "CLE_D0_CASH_TASKD0打款任务",
            "CLE_D0_CASH_TXD0提现流水",
            "CLE_D0_CASH_TX_HISD0历史提现流水",
            "CLE_D0_CASH_TX_STATD0代付流水统计",
            "CLE_D0_CLEANING_BILL_DETAILD0清分明细",
            "CLE_D0_MERGE_TASK",
            "CLE_DEPOSIT_ACCOUNT备付金账户",
            "CLE_DISBURSE_RECORD垫付记录",
            "CLE_DISBURSE_REPAY_DETAIL垫付回填明细",
            "CLE_EPAY_CONF直通车配置",
            "CLE_FUNDS_ACCOUNT资金核对关联的账户信息",
            "CLE_FUNDS_CHECK资金核对",
            "CLE_HOLIDAYS节假日",
            "CLE_INDUSTRY_ACC_BILL行业应用服务费",
            "CLE_INTERFACE_LOG清分接口流水",
            "CLE_MCH_SUBSIDY补贴商户",
            "CLE_MCH_SUBSIDY_DETAIL补贴商户明细",
            "CLE_PAYMENT_CLEAN_STATD0代付清分汇总",
            "CLE_PAY_CENTER_ACC_TASK按支付中心生成清分任务",
            "CLE_PINGAN_ODS_INVOICEpinganODS开票统计" ,
            "CLE_PINGAN_REFUND_TICKET平安退票记录",
            "CLE_RECONCILIATION_TASK清分接口流水",
            "CLE_REEXCHANGE_MANUAL退汇手工补清分记录",
            "CLE_SENSITIVE_DATA_OPR_LOG新建敏感数据操作日志",
            "CLE_THR_MCH_SUBSIDY_BILL二清商户补贴",
            "CLE_TOP_CHANNEL_BILL顶层机构分润",
            "CLE_UNION_BANK_NUM银联平台银联编码关系",
            "CMS_AGREE_SITE签约网点",
            "CMS_ALARM_CONF告警配置",
            "CMS_ALARM_RECORD告警发送记录",
            "CMS_ALIPAY_APP_CONFIG授权",
            "CMS_ALIPAY_AREA支付宝地区",
            "CMS_AN_XIN_CONTRACT安心签约",
            "CMS_AN_XIN_SIGN_FLOW安心签流水",
            "CMS_APP应用APP",
            "CMS_APP_MODULE应用APP与模块对应",
            "CMS_APP_USER应用APP与用户对应",
            "CMS_AREA地区",
            "CMS_BANK银行",
            "CMS_BANK_BRANCH银行支行",
            "CMS_BANK_LINE银行联行号关系",
            "CMS_BANK_OUTLETS银行网点",
            "CMS_BANK_VALID_CONF银行生效配置",
            "CMS_BANK_WHITE银行卡校验白名单",
            "CMS_BASE_DATA_MIGRATION基础资料迁移",
            "CMS_BASE_DATA_MODIFY基础数据变更",
            "CMS_BENEFIT_OWNER受益所有人",
            "CMS_BIND_CARD_INFO快捷绑卡信息",
            "CMS_BIND_CARD_LIMIT快捷绑卡限额信息",
            "CMS_BIND_CARD_USER快捷绑卡用户",
            "CMS_BIND_CARD_USER_AUTH快捷绑卡用户第三方授权",
            "CMS_BIND_MCH_NAME_LIST小程序商户二维码",
            "CMS_BIN_INFO卡bin管理",
            "CMS_BIZ_INFO支付接口业务信息",
            "CMS_BIZ_KEY支付接口业务key信息",
            "CMS_BLACK_WHITE_LIST黑白名单",
            "CMS_BLUE_ACTIVITY_MCH蓝海活动商户",
            "CMS_BRANCH分支行管理",
            "CMS_BUSINESS_LICENSE_AUTH_FLOW",
            "CMS_CENTER_ROUTE通道路由规则",
            "CMS_CHANNEL渠道",
            "CMS_CHANNEL_APANAGE_CONF机构属地配置",
            "CMS_CHANNEL_MERCHANT_OPR_LOG渠道商户审核激活日志",
            "CMS_CHANNEL_SPAY_BLACKLIST",
            "CMS_CHANNEL_SUBAPP_BIND渠道子商户绑定",
            "CMS_CHANNEL_SUBAPP_CONF渠道子商户配置",
            "CMS_CHANNEL_SUBAPP_WATER渠道子商户绑定流水",
            "CMS_CHANNEL_SUBBANK_INFO渠道关联支行信息",
            "CMS_CHANNEL_SUBSIDY_CONF渠道费率补贴白名单",
            "CMS_CHANNEL_SYNC",
            "CMS_CHANNEL_VIRTUAL_ACCOUNT渠道虚拟账号配置",
            "CMS_CHECK_AUTH_LOG鉴权操作记录",
            "CMS_CHECK_AUTH_OTHER其他鉴权",
            "CMS_CONFIG_MIGRATION配置升级记录",
            "CMS_CONTACT首页联系方式",
            "CMS_COUNTER计数器",
            "CMS_D0_MERCHANT_SYNCD0商户同步",
            "CMS_DEPT部门",
            "CMS_DEVICE_INFO设备信息",
            "CMS_DEVICE_INFO_HIS设备信息变更历史",
            "CMS_DEVICE_MODEL设备型号管理",
            "CMS_DEVICE_MODEL_NETCODE设备入网认证编号",
            "CMS_DEVICE_PARAM设备参数管理",
            "CMS_DISCIPLINE_INFO",
            "CMS_DOWNLOAD_CHECKSTAND下载收银台",
            "CMS_EMP员工资料",
            "CMS_FIELD_RULE字段规则配置",
            "CMS_FILE_UPLOAD文件上传下载",
            "CMS_FUNC功能",
            "CMS_FUNC_MARK新菜单标记",
            "CMS_GEOCOORD",
            "CMS_HELP_CENTER帮忙中心",
            "CMS_HUABEI_DISCOUNT花呗分期商户贴息",
            "CMS_INDUSTRY行业类别",
            "CMS_INIT_PARAMETER系统初始化参数",
            "CMS_INNER_ACCOUNT清分内部账户",
            "CMS_IP_LOCATIONIP位置",
            "CMS_LEDGER_ACCOUNT_MASTER交易商户",
            "CMS_LEDGER_ACCOUNT_MASTER_HIS交易商户历史",
            "CMS_LEDGER_ACCOUNT_SLAVE分账商户",
            "CMS_LEDGER_ACCOUNT_SLAVE_HIS分账商户分账变更历史",
            "CMS_MCH_APANAGE_ORG_CONF商户属地机构配置",
            "CMS_MCH_CANCEL_APPLY商户注销申请",
            "CMS_MCH_CENTER_ROUTE商户通道路由配置标",
            "CMS_MCH_INFO_HISTORY商户信息变更历史",
            "CMS_MCH_INVOICING_BIND_INFO商户开票二维码绑定信息",
            "CMS_MCH_PATROL_CONF商户巡检配置",
            "CMS_MCH_PATROL_RECORD商户巡检记录",
            "CMS_MCH_TEMPLATE",
            "CMS_MCH_TEMPLATE_CONF",
            "CMS_MERCHANT商户",
            "CMS_MERCHANT_BILL_NOTE_DETAIL",
            "CMS_MERCHANT_BRANCH_CONF商户归属分支行配置",
            "CMS_MERCHANT_BUSINESS商户业务信息",
            "CMS_MERCHANT_DETAIL商户详细信息",
            "CMS_MERCHANT_DETAIL_EXT商户详情拓展",
            "CMS_MERCHANT_DETAIL_SYNC",
            "CMS_MERCHANT_PROTOCOL商户签约协议",
            "CMS_MERCHANT_RISK商户黑名单",
            "CMS_MERCHANT_SUBSIDY_CONF商户补贴费率生效配置",
            "CMS_MERCHANT_SYNC",
            "CMS_MIGRATION机构商户迁移",
            "CMS_MOBILE_UNIQUE",
            "CMS_MODULE模块",
            "CMS_MONTH_MCH_CONF月结商户配置",
            "CMS_NATIONALITY_INFO",
            "CMS_ORG_MODIFY_EXAMINE商户机构数据变更审核",
            "CMS_ORG_PARAMETER_CONF机构参数配置",
            "CMS_ORG_RELATION机构关系",
            "CMS_ORG_SECONDARY_PWD机构二级密码",
            "CMS_ORG_SECRET_KEY机构密钥信息",
            "CMS_ORG_SECRET_KEY_PARAMETER机构密钥信息参数配置",
            "CMS_PCAC_MCH_REPORT支协商户上报",
            "CMS_PCAC_RISK_INFO支协风险信息",
            "CMS_PERMISSION权限",
            "CMS_POS_BIND_INFO设备绑定信息",
            "CMS_POS_BIND_INFO_HIS设备绑定信息流水",
            "CMS_POS_BIND_STATUSPOS激活绑定状态",
            "CMS_POS_CERT_INFONFC证书",
            "CMS_POS_DEPOSITpos终端库存",
            "CMS_POS_TERMpos终端信息",
            "CMS_PRODUCT_PACKAGE",
            "CMS_QR_CODE_COMPONENT二维码组件",
            "CMS_QR_CODE_DYNAMIC_INFO动态码",
            "CMS_QR_CODE_TEMPLATE二维码模板",
            "CMS_RESOURCES_INFO资源",
            "CMS_RETURN_IAE_CONF退款收支配置",
            "CMS_RISK_CONTROL风控记录",
            "CMS_RISK_INFO黑名单数据",
            "CMS_RISK_NOTIFY_SETTING微信风险商户回调地址设置",
            "CMS_RNS_BANK鉴权支持的银行",
            "CMS_RNS_CONF鉴权配置",
            "CMS_RNS_PENNY一分鉴权",
            "CMS_ROLE角色",
            "CMS_ROLE_PERMISSION角色权限",
            "CMS_ROUTE_POLICY",
            "CMS_SETTLEMENT_CYCLE商户结算周期",
            "CMS_SYS_ERROR_CODE系统错误码",
            "CMS_SYS_PARAMETER系统参数",
            "CMS_SYS_TYPE系统类型",
            "CMS_SYS_TYPE_CLASS系统类型分类",
            "CMS_THIRD_REQUEST_LOG第三方接口请求日志",
            "CMS_UNION_ID",
            "CMS_USER用户",
            "CMS_USER_LOGIN_COUNT用户输入密码错误次数",
            "CMS_USER_LOGIN_DETAIL用户登录详情",
            "CMS_USER_ROLE用户角色",
            "CMS_USER_SENSITIVE用户密码修改流水",
            "CMS_USER_WAIT_EXAMINE_ROLE用户待审核角色",
            "CMS_USER_WECHAT_NO",
            "CMS_VPAY_QR_BATCH固定二维码生成批次",
            "CMS_VPAY_QR_INFO固定二维码信息",
            "CMS_WAIT_EXAMINE_ROLE待审核角色",
            "CMS_WAIT_EXAMINE_RP待审核角色权限",
            "CMS_WAIT_EXAMINE_USER待审核用户",
            "CMS_WAIT_EXAMINE_USER_ROLE待审核用户角色",
            "CMS_WECHAT_AUTH_CERT微信鉴权证书",
            "CMS_WECHAT_GREEN_ACT微信绿洲计划报名",
            "CMS_WECHAT_MARKETING_SIGN_UP",
            "CMS_WEIXIN_REALNAME_AUTH微信实名认证",
            "CU_ACTIVITY活动信息",
            "CU_ACTIVITY_2C2C营销活动主",
            "CU_ACTIVITY_2C_BIN_REL营销活动2C卡BIN关联",
            "CU_ACTIVITY_2C_EXT营销活动2C扩展",
            "CU_ACTIVITY_2C_LOG营销活动2C操作记录",
            "CU_ACTIVITY_2C_MERCHANT_REL营销活动2C操作记录",
            "CU_ACTIVITY_2C_ORDER营销活动2C减免明细",
            "CU_ACTIVITY_2C_PRODUCT_TYPE营销活动2C产品分类关联",
            "CU_ACTIVITY_2C_STATIS_DAILY营销活动2C减免日统计",
            "CU_ACTIVITY_HIS活动信息历史",
            "CU_ACTIVITY_MERCHANT_REL活动商户关联",
            "CU_ACTIVITY_MERCHANT_REL_HIS活动商户关联历史",
            "CU_FEE_MANAGE手续费管理",
            "CU_ORDER_FEE订单费用明细",
            "CU_ORDER_FEE_STATISTICS订单费用汇总",
            "CU_ORDER_FEE_TRACK订单费用明细跟踪",
            "DIE_EXP_TASK基础资料导出任务",
            "DIE_IMP_TASK基础资料导入任务",
            "DIE_IMP_TASK_ERROE_DETAIL导入任务异常数据明细",
            "DIE_INITVAL_OPER_PARAM基础资料操作参数",
            "DIE_INITVAL_OPER_TASK基础资料操作任务",
            "DIE_TASK_FLAG定时任务标志",
            "FUND_AUTH",
            "FUND_AUTH_OPERATION",
            "HELP_CENTER_FAQ_TYPEFAQ类型",
            "MSG_INVALID_ADDRESS",
            "MSG_PRE_SEND_INFO机构激活消息发送信息记录",
            "MSG_SEND_LOG消息发送记录",
            "MSG_SEND_PARAM_CONF消息发送记录",
            "OPEN_APP_BANK_CONF银行应用",
            "OPEN_APP_BANK_HISTORY应用配置",
            "OPEN_APP_INFO应用",
            "OPEN_APP_KEY应用密钥",
            "OPEN_APP_MCH_HISTORY应用商户配置",
            "OPEN_APP_ORG_KEY机构密钥",
            "OPEN_APP_ORG_PERMISSION应用机构授权",
            "PAY_AMT_STATISTIC_POSpos金额统计",
            "PAY_DF_INFO_CONF代付信息配置",
            "PAY_DF_LOG_WATER代付日志流水",
            "PAY_DF_REFUND代付退汇",
            "PAY_DF_SIDE代付方",
            "PAY_DF_WATER代付流水",
            "PAY_MANAGE_RECORD_POSPOS管理交易记录",
            "PAY_MCH_AUTHNO",
            "PAY_MCH_ORDERNO",
            "PAY_MCH_REFUNDNO",
            "PAY_ORDER订单",
            "PAY_ORDER_NOTIFY_20221101",
            "PAY_ORDER_POSPOS金融交易记录",
            "PAY_ORDER_PREPAY_PARTITION",
            "PAY_ORDER_QUASI_REAL订单临时",
            "PAY_ORDER_TMP",
            "PAY_ORDER_TRACK_20221101",
            "PAY_PPC_ORDER",
            "PAY_PPC_REFUND",
            "PAY_PPC_REVERSE",
            "PAY_REFUND退款单",
            "PAY_REFUND_CHECK_POSPOS退款检查",
            "PAY_REFUND_QUASI_REAL退款单临时",
            "PAY_REVERSE冲正单",
            "PAY_REVERSE_PARTITION",
            "PAY_SR_NOTIFY_POS交易脚本结果通知记录",
            "QUARTZ_JOB",
            "RNS_APPLY_LIST",
            "RNS_MERCHANT_CHANNEL",
            "RNS_MESSAGE_CACHE",
            "RNS_WHILE_LIST_CONF",
            "SGS_CONSUME_ORDER_MAP",
            "SGS_PREAUTH_ORDER_MAP",
            "SGS_REVERSE_ORDER_MAP",
            "SGS_SERIAL_INFO",
            "SGS_SET_ROUTE_HISTORY",
            "SGS_SET_ROUTE_RULE",
            "SPAY_APP_UPDATE",
            "SPAY_ORDER_TOTAL",
            "STATE_CHECK_INFO",
            "STS_META_COUNT元数据统计",
            "STS_META_DATA统计元数据",
            "TASK_EXEC_LOG任务",
            "TASK_MANAGE任务",
            "TOUR_COMMENTS",
            "TOUR_SHOP_DETAIL_INFO",
            "TOUR_USER_INFO",
            "TRA_AUTH_CONFIG",
            "TRA_BANK_ACCOUNT银行结算账户",
            "TRA_BANK_ACCOUNT_EXAMINE银行结算账户审核",
            "TRA_BANK_ACCOUNT_MOVE_ERR结算卡号废弃失败数据",
            "TRA_BANK_ACCOUNT_SENSITIVE银行结算账户敏感操作",
            "TRA_BANK_CARD_AUTHED银行卡鉴权记录",
            "TRA_CENTER_GATEWAY_CERT支付中心证书",
            "TRA_CENTER_RATE_HISTORY支付中心费率变更历史",
            "TRA_CHANNEL_ANALYSIS渠道统计分析",
            "TRA_CH_PAY_CENTER_CONF渠道通道配置",
            "TRA_CH_PAY_CENTER_CONF_SYNC",
            "TRA_CH_PAY_CONF渠道支付类型配置",
            "TRA_CH_RATE_HISTORY渠道支付类型费率变更历史",
            "TRA_EXCESS_REFUND_CONF超退配置",
            "TRA_EXCESS_REFUND_RECORD超退流水",
            "TRA_EXP_FILEtra导出任务",
            "TRA_MARKETING_ACTIVITY_CONF营销活动配置",
            "TRA_MARKETING_ACTIVITY_COUNT营销活动统计报",
            "TRA_MARKETING_ACTIVITY_ORG营销活动商户",
            "TRA_MARKETING_ACTIVITY_RANGE营销活动范围",
            "TRA_MARKETING_ACTIVITY_REWARD营销活动奖励形式",
            "TRA_MARKETING_CLEANING_BILL营销活动清分统计",
            "TRA_MARKETING_CLEANING_LOG营销活动清分日志",
            "TRA_MARKETING_TIME_RECORD营销活动时间",
            "TRA_MCH_AMOUNT_INTERVAL_COUNT",
            "TRA_MCH_API_OLD",
            "TRA_MCH_CANCEL_CONF商户撤销配置",
            "TRA_MCH_FLOW_CONF",
            "TRA_MCH_GATEWAY_CERT商户支付证书",
            "TRA_MCH_GOODSTAG_CONFIG商品标识",
            "TRA_MCH_MULTI_RATE_HISTORY商户阶梯费率历史",
            "TRA_MCH_PARTNER_SYNC交易识别码同步临时",
            "TRA_MCH_PAY_CONF商户支付类型配置",
            "TRA_MCH_PAY_CONF_SYNC",
            "TRA_MCH_QR_ORDER",
            "TRA_MCH_RANK_CONF商户等级配置",
            "TRA_MCH_RANK_CONF_RECORD商户等级配置",
            "TRA_MCH_RATE_HISTORY商户支付类型费率变更历史",
            "TRA_MCH_REFUND_WHITE_LIST商户超退白名单",
            "TRA_MCH_RISK_PUSH推送风险商户",
            "TRA_MCH_THI_REGISTER商户报备信息",
            "TRA_MCH_TRADE_AMOUNT_INTERVAL",
            "TRA_MCH_TRADE_IP商户交易IP日统计",
            "TRA_MERCHANT_ANALYSIS商户统计分析",
            "TRA_MERCHANT_ANALYSIS_MONTH商户统计月分析",
            "TRA_ORDER_RNS",
            "TRA_ORDER_STATUS_SYNC_LOG",
            "TRA_ORG_RATE_PASSAGE",
            "TRA_PAY_CENTER支付中心",
            "TRA_PAY_ORDER_COUNT订单统计",
            "TRA_PAY_ORDER_DEBIT_CREDIT借贷分离统计",
            "TRA_PAY_ORDER_DEBIT_CREDIT_M借贷分离月统计",
            "TRA_PAY_ORDER_MCH_COUNT商户实时数据统计",
            "TRA_PAY_ORDER_REMOTE_TRANS异地交易数据统计",
            "TRA_PAY_ORDER_REMOTE_TRANS_M异地交易数据月统计",
            "TRA_PAY_ORDER_STATS",
            "TRA_PAY_ORDER_SUCCESS_RATIO订单成功率",
            "TRA_PAY_ORDER_TEMP临时订单",
            "TRA_PAY_TYPE支付类型",
            "TRA_REFUND_BATCH_APPLY批量申请退款",
            "TRA_REFUND_BATCH_APPLY_DETAIL",
            "TRA_REFUND_MCH_POLICY商户退款策略配置",
            "TRA_REFUND_ORG_POLICY机构退款策略",
            "TRA_REFUND_PLAT_POLICY平台退款策略配置",
            "TRA_REFUND_POLICY退款策略配置",
            "TRA_RISK_DATA风险数据",
            "TRA_RISK_PUSH_ORDER_NOS风险推送订单号",
            "TRA_RISK_TRADE_AREA_EXCEPTION交易地异常订单",
            "TRA_SFT_MCH_REGISTER盛付通商户同步",
            "TRA_SFT_TO_CIB盛付通到Cib进件支付类型映射",
            "TRA_SPAY_CHANNEL_CONFSPAY渠道配置",
            "TRA_SPAY_MCH_CONF渠道小商户进件配置",
            "TRA_SUB_MCH_CHANNEL",
            "TRA_SUB_MCH_INFO孙子商户信息",
            "TRA_SUPER_REFUND_CONF超退配置",
            "TRA_SUPER_REFUND_RECORD超退流水",
            "TRA_THI_PARTNER_INFO第三方交易识别码信息",
            "TRA_THI_REGISTER第三方报备信息",
            "TRA_UNION_STD_QR_CODE银联标准聚合二维码",
            "T_BILLNO_APPID_CONFIG",
            "T_COMMON_SEQUENCE",
            "T_COMMON_SEQUENCE_SUB",
            "UNIVERSAL_MSG_PRE_SEND_INFO通用消息发送信息记录",
            "UNIVERSAL_MSG_SERVICE_CONF短信邮件业务的配置",
            "VPAY_ACTIVELIST",
            "VPAY_ACTIVE_INFO",
            "VPAY_ACTIVE_TOTAL",
            "VPAY_ALI_HORN_SETTING厂商阿里云喇叭配置",
            "VPAY_APICODE_SHOW",
            "VPAY_APP_WECHAT_USER",
            "VPAY_APP_WECHAT_USER_TOKEN",
            "VPAY_BANK_NAME_CHANNEL",
            "VPAY_BUSINESS_INFO生意经",
            "VPAY_CHANNEL_ACCEPT_ORG",
            "VPAY_CHANNEL_CLASS",
            "VPAY_CHANNEL_CLS",
            "VPAY_CHANNEL_FUNC",
            "VPAY_CLOUD_HORN_INFO云喇叭信息",
            "VPAY_CLOUD_HORN_INFO_RECORD云喇叭入库记录",
            "VPAY_DEVICE_COUNT",
            "VPAY_DEVICE_DAY_COUNT",
            "VPAY_DYN_BOUNDARY",
            "VPAY_ENUM_CLASS",
            "VPAY_ENUM_TYPE",
            "VPAY_EQUIPMENT_NUMBER",
            "VPAY_FEEDBACK",
            "VPAY_FILEMD5_INFO",
            "VPAY_FUNC_GRID",
            "VPAY_FUNC_GRID_WHITELIST",
            "VPAY_GREETINGS_INFO问候语",
            "VPAY_HB_SETTING",
            "VPAY_LAST_LOGIN_INFO",
            "VPAY_LOGIN_UNION_BIND_INFO",
            "VPAY_MCH_CHANNEL",
            "VPAY_MERCHANT_LOAN",
            "VPAY_MERCHANT_SWITCH",
            "VPAY_NOTICE_INFOR",
            "VPAY_NOTICE_WHITE",
            "VPAY_ORDER_RELA",
            "VPAY_PRO_INFORMATION",
            "VPAY_PUSHINFO",
            "VPAY_PUSH_PRINTER",
            "VPAY_PUSH_SETTING",
            "VPAY_PUSH_USER",
            "VPAY_QR_BATCH",
            "VPAY_QR_EPROTOCOL",
            "VPAY_QR_INFO",
            "VPAY_QR_MCH_EPROTOCOL",
            "VPAY_QR_MERCHANT",
            "VPAY_REFUND_RELA",
            "VPAY_SMALL_PROGRAM_INFO",
            "VPAY_SYS_PARAMS",
            "VPAY_TERMINAL",
            "VPAY_TIMED_TASK",
            "VPAY_TRADE_REMARK",
            "VPAY_TRADE_TYPE",
            "VPAY_USER_DEVICE_SWITCH",
            "VPAY_WIN_SWITCH",
            "VPAY_WXCARD",
            "WECHAT_AUTHORIZER_TOKEN",
            "WECHAT_CACHE",
            "WECHAT_MEDIA",
            "WECHAT_MESSAGE",
            "WECHAT_OPEN_AUTH_TOKEN",
            "WECHAT_OPEN_BUSINESS",
            "WECHAT_OPEN_OAUTH",
            "WECHAT_OPEN_SETTING",
            "WECHAT_SCENE",
            "WECHAT_TOKEN",
            "WECHAT_USER",
            "WFT_CODE_TYPE",
            "WFT_ERROR_DESC_LANG",
            "WFT_ERROR_INNER",
            "WFT_ERROR_MAIN",
            "WFT_LANG",
            "WFT_PLATFORM",
            "WOP_INTERFACE_CALL_WATER接口调用流水",
            "WOP_PARTNER_PRODUCT合作伙伴产品",
            "WOP_PARTNER_PRODUCT_REL合作伙伴产品关系",
            "WOP_PRODUCT_PARAM_CONF产品参数配置",
            "WOP_PRODUCT_PARAM_VALUE产品版本参数值",
            "WOP_SYS_SERVICE_REGISTER系统服务注册",
            "XWAPP_ADVERTISE_CONF公众号广告配置",
            "XWAPP_ADVERTISE_CONF_EXP公众号广告配置扩展",
            "XWAPP_MESSAGE_PUSH_FLOW消息推送流水",
            "XWAPP_MESSAGE_PUSH_TASK消息推送任务",
            "XWAPP_MESSAGE_TEMPLATE消息推送配置",
            "XWAPP_MSG_TEMP_MSG_TYPE消息推送配置消息类型",
            "XWAPP_MSG_TEMP_TAR_TYPE消息推送配置目标对象",
            "XWAPP_SUBSCRIBE_QR_INFO公众号二维码信息",
            "XWAPP_SUBSCRIBE_QR_WX_USER二维码绑定用户信息",
            "XWAPP_WX_ACCESS_TOKEN微信access_token记录",
            "XWAPP_WX_USER微信用户信息",
            "XWAPP_WX_USER_LOGIN_RECORD登录记录",
            "XWAPP_WX_USER_LOGIN_USER微信用户绑定登录用户信息",
            "XWAPP_WX_USER_ORG微信用户绑定机构信息");

}
